package flc.ast.fragment;


import androidx.fragment.app.Fragment;

import android.text.TextUtils;

import com.blankj.utilcode.util.NetworkUtils;

import flc.ast.R;
import flc.ast.databinding.FragmentDeviceTabBinding;
import stark.common.basic.base.BaseNoModelFragment;
import stark.common.basic.device.DeviceInfoUtil;

/**
 * A simple {@link Fragment} subclass.
 * Use the {@link DeviceTabFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class DeviceTabFragment extends BaseNoModelFragment<FragmentDeviceTabBinding> {


    @Override
    protected int onCreate() {
        return R.layout.fragment_device_tab;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
        mDataBinding.tvBrand.setText(DeviceInfoUtil.getDeviceBrand());
        mDataBinding.tvModel.setText(DeviceInfoUtil.getDeviceDevice());
        mDataBinding.tvMade.setText(android.os.Build.MANUFACTURER);
        mDataBinding.tvService.setText(android.os.Build.DEVICE);
        mDataBinding.tvZhuban.setText(DeviceInfoUtil.getDeviceBoard());
        mDataBinding.tvPinTai.setText(android.os.Build.TYPE);
        mDataBinding.tvPinPai.setText(DeviceInfoUtil.getDeviceBrand());
        mDataBinding.tvServiceId.setText(DeviceInfoUtil.getDeviceId());
        mDataBinding.tvXulieHao.setText(DeviceInfoUtil.getDeviceSerial());
        mDataBinding.tvYunYin.setText(TextUtils.isEmpty(NetworkUtils.getNetworkOperatorName()) ? getString(R.string.unknown) : NetworkUtils.getNetworkOperatorName());
        mDataBinding.tvZhiWen.setText(android.os.Build.FINGERPRINT);
        mDataBinding.tvType.setText(NetworkUtils.getNetworkType().name());
    }
}